<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'article-form',
	'enableAjaxValidation'=>false,
  'htmlOptions'=>array('enctype' => 'multipart/form-data')
)); ?>

<p class="note">
<?php echo Yii::t('default', 'field_with', array('{star}'=>'<span class="required">*</span>'))?>
</p>

<?php echo $form->errorSummary($model, '', '', array('class' => 'alert alert-error')); ?>

<div class="tabs-container">
  <ul class="tabs-frame">
    <li>
      <a href="#"> 
        <img src="<?php echo Yii::app()->baseUrl?>/images/language/vietnam-icon.png" alt="vn">
      </a>
    </li>
    <li>
      <a href="#">
        <img src="<?php echo Yii::app()->baseUrl?>/images/language/uk-icon.png" alt="uk">
      </a>
    </li>
  </ul>
  <div class="tabs-frame-content">
    <div class="column one-half">
      <label>
        <?php echo Yii::t('default', 'Article', array(), null, 'vi')?> <span class="required">*</span> 
      </label>
        <?php echo $form->textField($model, 'title')?>
    </div>
    
    <div class="column one-column">
      <label>
        <?php echo Yii::t('default', 'Description', array(), null, 'vi')?>
      </label>
        <?php echo $form->textArea($model, 'description', array('row'=>3))?>
    </div>
    
    <div class="column one-column">
      <label>
        <?php echo Yii::t('default', 'Detail', array(), null, 'vi')?>
      </label>
        <?php
        $this->widget('ext.ckeditor.CKEditorWidget',array(
            "model"=>$model,
            "attribute"=>'detail',
            "config" => array(
              "language"=>"vi",
              "height"=>"300px",
        ),
        ));
        ?>
    </div>
  </div>
    
  <div class="tabs-frame-content">
    <div class="column one-half">
      <label>
        <?php echo Yii::t('default', 'Article', array(), null, 'en')?> 
      </label>
        <?php echo $form->textField($model, 'title2')?>
    </div>
    
    <div class="column one-column">
      <label>
        <?php echo Yii::t('default', 'Description', array(), null, 'en')?> 
      </label>
        <?php echo $form->textArea($model, 'description2')?>
    </div>
    
    <div class="column one-column">
      <label><?php echo Yii::t('default', 'Detail', array(), null, 'en')?>
        <span class="required">*</span> </label>
        <?php
        $this->widget('ext.ckeditor.CKEditorWidget',array(
            "model"=>$model,
            "attribute"=>'detail2',
            "config" => array(
              "language"=>"en",
              "height"=>"300px",
        ),
        ));
        ?>
    </div>
  </div>
</div>

<div class="column one-column">
<label class="clearfix">
  <?php echo Yii::t('default', 'Image')?>
</label>
<?php echo $form->fileField($model, 'image')?>

<?php if(!$model->isNewRecord && !empty($image) && file_exists(Yii::app()->basePath . "/../upload/article/thumbs_90x85/" . $image['save'])) {?>
<div class="clearfix">
  <div class="MultiFile-label" id="file_<?php echo $image['id']?>">
    <?php echo CHtml::image(Yii::app()->baseUrl.'/upload/article/thumbs_90x85/'.$image['save'])?>
  </div>
</div>
<p class="note"><?php echo Yii::t('default', 'Leave blank if do not change background.')?></p>
<?php }?>

<p class="note" ><?php echo yii::t('default', 'Accept files')?>: jpg, jpeg, gif, png.</p>
</div>

<div class="column two-third">
<?php echo $form->labelEx($model,'enabled', array('class'=>'clearfix')); ?>
<?php echo $form->radioButtonList($model, 'enabled', array('1' => Yii::t('default', 'Yes'), '0' => Yii::t('default', 'No')), array('separator'=>'', 'template'=>' {input} {label} ')); ?>
</div>

<div class="clear">
<?php echo CHtml::submitButton($model->isNewRecord ? Yii::t('default', 'Create') : Yii::t('default', 'Update')); ?>
</div>

<?php $this->endWidget(); ?>